/**
 * @description  场外基金指令(赎回规则)
 * @author shenhong
 */
import React, { PureComponent } from 'react';
import { Row, Col } from 'antd';
import { NoDataMaskC } from '../../../../comps';
import style from '../index.less';
class BuyRule extends PureComponent {
  constructor() {
    super();
    this.state = {};
  }

  render() {
    const { info } = this.props;
    const applylist = info != undefined && info != null ? info.applylist : [];
    return (
      <>
        <div style={{ position: 'relative' }}>
          <Row className={style.fundInfo}>
            <Col span={4} style={{ textAlign: 'right' }}>
              <span>成立日期：</span>
            </Col>
            <Col span={8} style={{ textAlign: 'left' }}>
              <span>{`${info && info.listingdate ? info.listingdate : '--'}`}</span>
            </Col>
            <Col span={4} style={{ textAlign: 'right' }}>
              <span>交易状态：</span>
            </Col>
            <Col span={8} style={{ textAlign: 'left' }}>
              <span>{`${info && info.jyzt ? info.jyzt : '--'}`}</span>
            </Col>
          </Row>
          <div className={style.fundInfo3}>
            {applylist && applylist.length
              ? applylist.map((item, index) => {
                  return (
                    <Row key={index}>
                      <span>{`${item}`}</span>
                    </Row>
                  );
                })
              : null}
          </div>
          {info !== undefined ? null : <NoDataMaskC height={'100%'} title='请选择基金代码，加载数据' />}
        </div>
      </>
    );
  }
}

export default BuyRule;
